package com.ruoyi.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品管理对象 product
 * 
 * @author ruoyi
 * @date 2025-10-09
 */
public class Product extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键（自增） */
    private Long id;

    /** 商品名称（必填） */
    @Excel(name = "商品名称", readConverterExp = "必=填")
    private String name;

    /** 规格（如“500ml/瓶”） */
    @Excel(name = "规格", readConverterExp = "如=“500ml/瓶”")
    private String spec;

    /** 商品条码（可选） */
    @Excel(name = "商品条码", readConverterExp = "可=选")
    private String barCode;

    /** 采购价（成本，必填） */
    @Excel(name = "采购价", readConverterExp = "成=本，必填")
    private BigDecimal purchasePrice;

    /** 售价（必填） */
    @Excel(name = "售价", readConverterExp = "必=填")
    private BigDecimal sellingPrice;

    /** 品类：1=快消品，2=电子配件，3=其他 */
    @Excel(name = "品类：1=快消品，2=电子配件，3=其他")
    private Long category;

    /** 状态：1=可用，0=已下架 */
    @Excel(name = "状态：1=可用，0=已下架")
    private Long status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setSpec(String spec) 
    {
        this.spec = spec;
    }

    public String getSpec() 
    {
        return spec;
    }

    public void setBarCode(String barCode) 
    {
        this.barCode = barCode;
    }

    public String getBarCode() 
    {
        return barCode;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) 
    {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getPurchasePrice() 
    {
        return purchasePrice;
    }

    public void setSellingPrice(BigDecimal sellingPrice) 
    {
        this.sellingPrice = sellingPrice;
    }

    public BigDecimal getSellingPrice() 
    {
        return sellingPrice;
    }

    public void setCategory(Long category) 
    {
        this.category = category;
    }

    public Long getCategory() 
    {
        return category;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("spec", getSpec())
            .append("barCode", getBarCode())
            .append("purchasePrice", getPurchasePrice())
            .append("sellingPrice", getSellingPrice())
            .append("category", getCategory())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .toString();
    }
}
